/*
 * $Id$
 *
 * Copyright (C) IUT Montreuil-University Paris 8, 2009-2010
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 */

package fr.univ_paris8.iut.linc.align;

import java.net.URI;

public class Property extends Entity {
	private String name;
	private String label;
	private String restriction;
	private int cardinality;
	private URI uri;
	
public Property(String restriction, int cardinality, String name ) {
		super(name);
		this.cardinality = cardinality;
		this.restriction = restriction;
	}

public URI getUri (){
	return super.getUri();
	
}

public void setUri(URI uri) {
	super.setUri(uri);
}

public String getName() {
	return super.getName();
}

public void setName(String name) {
	super.setName(name);
}

public String getLabel() {
	return super.getLabel();
}

public void setLabel(String label) {
	super.setLabel(label);
}

public String getRestriction() {
	return restriction;
}

public void setRestriction(String restriction) {
	this.restriction = restriction;
}

public int getCardinality() {
	return cardinality;
}

public void setCardinality(int cardinality) {
	this.cardinality = cardinality;
}

public String toString (){
	return "<" + this.restriction +" " + this.cardinality +":" + super.getName() + ">";
}

public boolean equals (Object obj) {
	if(obj instanceof Property) 
	return (this.getName().equals(((Property) obj).getName())&& this.getCardinality()==((Property) obj).getCardinality()
	&& this.getRestriction().equals(((Property) obj).getRestriction()));
	return false;
}

}

